axios.interceptors.request.use(req=>{
    req.headers.accesstoken=localStorage.getItem("accessToken");
    return req;
})
axios.interceptors.response.use(resp=>{
    if (resp.headers.accesstoken!=null){
        localStorage.setItem("accessToken",resp.headers.accesstoken)
    }
    return resp;
})


new Vue({
    el:"#app",
    data:{
        accountInfo:{},
        newAccountInfo:{
            accountInfoId:"",
            accountId:"",
            accountPhone:"",
            accountIdCard:"",
            accountSex:1,
            accountRealName:""
        },
        updateWindow: false
    },
    methods: {
        loadMyInfo(){
            axios.get("/accountInfo/showMyInfo").then(resp=>{
                console.log(resp)
                this.accountInfo = resp.data.data
            })
        }
    },
    created(){
        this.loadMyInfo()
    }
})